home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Sample Code / Http Server / •HTTP Server / THTTPServer.h < prev   
Encoding:
Text File  |  1996-01-11  |  1.8 KB  |  79 lines  |  [TEXT/CWIE]

  1. //    THTTPServer.h - Macintosh OpenTransport Network HTTP Server class object
  2. // 
  3. // Apple Macintosh Developer Technical Support
  4. // Written by:  Vinne Moscaritolo
  5. //
  6. //  Copyright (work in progress)  Apple Computer, Inc All rights reserved.
  7. //
  8. // You may incorporate this sample code into your applications without
  9. // restriction, though the sample code has been provided "AS IS" and the
  10. // responsibility for its operation is 100% yours.  However, what you are
  11. // not permitted to do is to redistribute the source as "DSC Sample Code"
  12. // after having made changes. If you're going to re-distribute the source,
  13. // we require that you make it clear in the source that the code was
  14. // descended from Apple Sample Code, but that you've made changes.
  15. // 
  16.  
  17. #ifndef _H_THTTPSERVER
  18. #define _H_THTTPSERVER
  19.  
  20. #include "TNetworkServerApp.h"
  21. #include "TNetworkAcceptor.h"
  22.  
  23. //
  24. // THTTPServer  - OpenTransport HTTP Acceptor class 
  25. //
  26. class THTTPServer : public TNetworkAcceptor
  27. {
  28. //     CONSTRUCTORS AND DESTRUCTORS
  29. public:
  30.             THTTPServer();
  31.     virtual    ~THTTPServer();
  32.     
  33. // HIGH LEVEL FUNCTIONS
  34. public:
  35.     virtual TNetworkSession* SessionFactory();
  36.     
  37. };
  38.  
  39. //
  40. // THTTPSession  - OpenTransport HTTP Session class 
  41. //
  42. class THTTPSession : public TNetworkSession
  43. {
  44. //     CONSTRUCTORS AND DESTRUCTORS
  45. public:
  46.              THTTPSession(THTTPServer*);
  47.     virtual    ~THTTPSession();
  48.     
  49. // HIGH LEVEL FUNCTIONS
  50. public:
  51.     virtual    void*    Run();            // thread task
  52. };
  53.  
  54.  
  55.  
  56. //
  57. // THTTPServerApp  - Macintosh OpenTransport Network HTTP Server Application class object
  58. //
  59. class THTTPServerApp : public TNetworkServerApp
  60. {
  61.  
  62. //     CONSTRUCTORS AND DESTRUCTORS
  63. public:
  64.              THTTPServerApp();
  65.     virtual    ~THTTPServerApp();
  66.  
  67. // HIGH LEVEL FUNCTIONS
  68. public:
  69.     virtual void Start();            // start the application and let it run
  70.  
  71. // PRIVATE FIELDS
  72. private:
  73.     THTTPServer*    fServer;
  74.     TNetworkEndpointDescriptor fDescriptor;
  75. };
  76.  
  77.  
  78. #endif
  79.